<?php

require_once 'common/conn.php';
if (isset($_GET['num'])) {
    $num = $_GET['num'];
} else {
    $num = 0;
}
if (isset($_GET['count'])) {
    $count = $_GET['count'];
}
$data = array();
if (is_numeric($num) && is_numeric($count)) {
    $db = new DBC();
    $sql = "SELECT productid,flashcode,age,name,url_en AS url,imageURL,version,size,type1,type2,type3,downloadtimes FROM t_product WHERE status_en = 1 ORDER BY downloadtimes DESC LIMIT " . $num . "," . $count;
  
  	 $data = $db->fetchData($sql);
}
echo json_encode($data);
?>